﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using MSXML2;//一定要添加引用
public partial class AjaXXML组件测试使用 : System.Web.UI.Page
{
    public MSXML2.XMLHTTP vv;
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Request.QueryString["w"] != "")
            {
                searchjo(Request.QueryString["w"]);
            }
        }
        catch
        { 
            
        }
    }
    public void searchjo(string xx)
    {

        //string htmltxt;//返回的HTML文字
       // string chareset;//编码类型
        vv = new MSXML2.XMLHTTP();
        vv.open("get", "" + xx, false, "", "");//http://www.google.cn/search?q=
        vv.send(null);
        //Response.Charset = "gb2312";
       // htmltxt = vv.responseText;
       // chareset = htmltxt.IndexOf("charset=").ToString();
        //看看是不是有编辑文件
        Response.Write(vv.responseText);
    }
}
